package com.agriculture.domain;

import java.util.Date;
import java.math.BigDecimal;

public class Inventory {
    // 数据库字段，与表字段完全匹配
    private Long inventory_id;      // 对应 inventory_id
    private Long product_id;        // 对应 product_id
    private Long owner_id;          // 对应 owner_id
    private Integer current_stock;  // 对应 current_stock
    private Integer minimum_stock;  // 对应 minimum_stock
    private String operator;        // 对应 operator
    private Date created_at;        // 对应 created_at
    private Date update_time;       // 对应 update_time
    
    // 非数据库字段，用于展示
    private String product_name;    // 对应 products.product_name
    private String category;        // 对应 products.category
    private String unit;            // 对应 products.unit
    private String farmer_name;     // 对应 users.username
    private BigDecimal price;       // 对应 products.price
    private Product product;        // 关联的商品对象

    // 构造函数
    public Inventory() {
    }

    // Getters and Setters
    public Long getInventory_id() {
        return inventory_id;
    }

    public void setInventory_id(Long inventory_id) {
        this.inventory_id = inventory_id;
    }

    public Long getProduct_id() {
        return product_id;
    }

    public void setProduct_id(Long product_id) {
        this.product_id = product_id;
    }

    public Long getOwner_id() {
        return owner_id;
    }

    public void setOwner_id(Long owner_id) {
        this.owner_id = owner_id;
    }

    public Integer getCurrent_stock() {
        return current_stock;
    }

    public void setCurrent_stock(Integer current_stock) {
        this.current_stock = current_stock;
    }

    public Integer getMinimum_stock() {
        return minimum_stock;
    }

    public void setMinimum_stock(Integer minimum_stock) {
        this.minimum_stock = minimum_stock;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public Date getCreated_at() {
        return created_at;
    }

    public void setCreated_at(Date created_at) {
        this.created_at = created_at;
    }

    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    public String getProduct_name() {
        return product_name;
    }

    public void setProduct_name(String product_name) {
        this.product_name = product_name;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getFarmer_name() {
        return farmer_name;
    }

    public void setFarmer_name(String farmer_name) {
        this.farmer_name = farmer_name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }
}

